/*
 * Copyright (c) 2018. czmc All Rights Reserved.
 * Author: czmc
 * Email: zxc6355533@163.com
 * Encoding: UTF-8
 */

package top.stime21.myneighbours.module.topic

import android.os.Bundle
import android.support.v7.widget.LinearLayoutManager
import android.view.View
import kotlinx.android.synthetic.main.fragment_topic.*
import kotlinx.android.synthetic.main.fragment_topic.view.*
import top.stime21.myneighbours.R
import top.stime21.myneighbours.base.BuzBaseFragment


/**
 * Author: czmc  Email: zxc6355533@163.com
 * Version:	1.0  Date:2018/3/1
 */

class TopicFragment : BuzBaseFragment(){
    override fun getLayoutId(): Int {
         return R.layout.fragment_topic
    }

    override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
        super.onViewCreated(view, savedInstanceState)
        initView()
    }


    fun initView(){
        rootView.recycleView.layoutManager = LinearLayoutManager(context,LinearLayoutManager.VERTICAL,false)
        rootView.recycleView.adapter = TopicAdapter(context())
        swipeRefreshLayout.setOnRefreshListener {
            //TODO 请求
            swipeRefreshLayout.isRefreshing = false
        }
    }

}